package com.carrent.demo.Service.Impl;

import com.carrent.demo.Mapper.EmployeeInformationMapper;
import com.carrent.demo.Domain.EmployeeInformation;
import com.carrent.demo.Service.EmployeeInformationService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class EmployeeInformationImpl implements EmployeeInformationService {
    @Autowired
    EmployeeInformationMapper employeeInformationMapper;

    @Override
    public EmployeeInformation login(String account) {
        final EmployeeInformation login = employeeInformationMapper.login(account);
        return  login;
    }

    @Override
    public List<EmployeeInformation> getPage(Integer start, Integer pageSize, String name) {
        final List<EmployeeInformation> page1 = employeeInformationMapper.getPage(start, pageSize, name);
        return page1;
    }

    @Override
    public Integer getCount(String name) {
        return employeeInformationMapper.getCount(name);
    }

    @Override
    public Boolean addEmployee(EmployeeInformation employeeInformation) {
        return employeeInformationMapper.addEmployee(employeeInformation);
    }

    @Override
    public Boolean deleteEmployee(String id) {
        return employeeInformationMapper.deleteEmployee(id);
    }

    @Override
    public Boolean editEmployee(EmployeeInformation employeeInformation) {
        return employeeInformationMapper.editEmployee(employeeInformation);
    }


}
